package code._13io.charstream._03transfer;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;

public class Demo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fileOutputStream = new FileOutputStream("fileTest\\a.txt");
        OutputStreamWriter out = new OutputStreamWriter(fileOutputStream);
        out.write(97);
        out.write(System.lineSeparator());

        String s = "宝,我今天输液了,什么夜,想你的夜";
        char[] chars = s.toCharArray();
        out.write(chars);
        out.write(System.lineSeparator());

        out.write(chars,2,3);
        out.write(System.lineSeparator());

        out.write("大郎,该喝药了");
        out.flush();
        out.close();
    }
}
